#pragma once
#include "PDFTools/inc/splitter.h"
#include "afxwin.h"

// CPdfToolsTestDlg dialog
class CPdfToolsTestDlg : public CDialog
{
// Construction
public:
	CPdfToolsTestDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	enum { IDD = IDD_PDFTOOLSTEST_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support


// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
	void UpdateSrcList();
	void UpdatePagesList();
	void UpdateDstList();
	void AppendLog(const CString &msg, bool display = true);

	CCriticalSection m_csStopThread;
	bool			 m_bStopThread;
	CWinThread*		 m_pSplitThread;
	CWinThread*		 m_pMergeThread;
	CString			 m_sSrcFileName;

	CString m_sOldPath;
	CString m_sNewPath;
	afx_msg void OnBnClickedButtonSrcPath();
	int m_nModuleVersion;
public:
	afx_msg void OnBnClickedRadio();
	CString m_sSrcPath;
	CString m_sDstPath;
	afx_msg void OnBnClickedButtonDstPath();
	afx_msg void OnEnChangeEditSrcPath();
	afx_msg void OnEnChangeEditDstPath();
	CListBox m_lbSrcFolder;
	CListBox m_lbDstFolder;
	CListBox m_lbPages;
	afx_msg void OnLbnDblclkListOrig();
	afx_msg void OnLbnDblclkListSplit();
	afx_msg void OnLbnDblclkListMerge();
	afx_msg void OnBnClickedButtonSplit();
	afx_msg void OnBnClickedButtonStop();
	CListBox m_lbLog;
protected:
	virtual BOOL OnWndMsg(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pResult);
public:
	afx_msg void OnBnClickedButtonMerge();
	afx_msg void OnLbnSelchangeListOrig();
	afx_msg void OnBnClickedLogButton();
	BOOL m_bPagesFilter;
};
